﻿Imports System.Globalization

Namespace TweeVo
	Public Class EncryptionConverter
		Implements IValueConverter
		' decrypt
		Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
			Return (TryCast(value, String)).DecryptString()
		End Function

		' encrypt
		Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
			Return (TryCast(value, String)).EncryptString()
		End Function
	End Class
End Namespace
